

#pragma once 


class Quaternion_old
{
public:

	float x,y,z,w;
	Quaternion_old();
	Quaternion_old Conjugate();
	float Magnitude();
	void Normalize();

	Quaternion_old operator*(const Quaternion_old inQuat);
		
};

Quaternion_old::Quaternion_old()
{
	x=y=z=w=0;
}

float Quaternion_old::Magnitude()
{
	return sqrt(x*x + y*y + z*z + w*w);
}

void Quaternion_old::Normalize()
{
	float mag = Magnitude();
	w = w/mag;
	x =x/mag;
	y = y/mag;
	z = z/mag;

}

Quaternion_old Quaternion_old::Conjugate()
{
	Quaternion_old q;
	q.w = w;
	q.x = -x;
	q.y = -y;
	q.z = -z;

	return q;
}

Quaternion_old operator*(const Quaternion_old inQuat)
{
/*	  Qr = Q1.Q2 = ( w1.w2 - v1.v2, w1.v2 + w2.v1 + v1 x v2 )

  where v1 = (x,y,z) of Q1
        w1 = (w)     of Q1
        v2 = (x,y,z) of Q2
        w2 = (w)     of Q2  */

	float A = w*inQuat.w;
	float B = x*inQuat.x + y*inQuat.y + z* inQuat.z;




}